﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true" CodeFile="Yalie.aspx.cs" Inherits="Yalie_Yalie" %>

<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" Runat="Server">
    <style type="text/css">
        .style2
        {
            font-size: medium;
        }
    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" Runat="Server">
    <p class="style2">
        <strong>压裂数据维护<br />
        1.数据录入：单条记录录入</strong></p>
        <asp:GridView ID="GridView1" runat="server" AllowPaging="True" 
            AutoGenerateColumns="False" DataKeyNames="JH,KGRQ,YLRQ,YLCS,CH,SGCW,SGJDDS1,PLYL" 
            DataSourceID="SqlDataSource1" ondatabound="GridView1_DataBound" 
            onselectedindexchanged="GridView1_SelectedIndexChanged" 
            ShowFooter="True" EnablePersistedSelection="True" 
            ShowHeaderWhenEmpty="True" 
            onselectedindexchanging="GridView1_SelectedIndexChanging">
            <Columns>
                <asp:CommandField ShowEditButton="True" />
                <asp:BoundField DataField="JH" HeaderText="井号" SortExpression="JH" />
                <asp:BoundField DataField="KGRQ" DataFormatString="{0:d}" HeaderText="开工日期" 
                    SortExpression="KGRQ" FooterText="需要补录，来自施工总结" >
                <ItemStyle Width="65px" />
                </asp:BoundField>
                <asp:BoundField DataField="WGRQ" DataFormatString="{0:d}" HeaderText="完工日期" 
                    SortExpression="WGRQ" FooterText="需要补录，来自施工总结" >
                <ItemStyle Width="65px" />
                </asp:BoundField>
                <asp:BoundField DataField="CSMC" HeaderText="措施名称" SortExpression="CSMC" 
                    FooterText="措施的汉字名称，压裂、酸化填写至亚类，其他措施填写至大类，具体见开发逻辑结构附录表16" />
                <asp:BoundField DataField="SGFS" HeaderText="施工方式" SortExpression="SGFS" 
                    FooterText="需要补录，措施施工的工艺方法，参考施工总结或施工方案，压裂填写压裂方式（限流法压裂、普压等），补孔填写补孔方式等等" />
                <asp:BoundField DataField="CSCD" HeaderText="措施层段" SortExpression="CSCD" 
                    FooterText="施工层段名称，来自施工总结，填写格式 油层组名用汉字加阿拉伯数字，不同级别层位间半角下划线分割，措施层段所跨层位用“至”连接                  例如：高2_6 至 高2_7+8" />
                <asp:BoundField DataField="SGCW" FooterText="井下公司提供" HeaderText="措施层位(原始数据)" 
                    SortExpression="SGCW" ReadOnly="True">
                <ItemStyle Width="80px" />
                </asp:BoundField>
                <asp:BoundField DataField="SGJDDS1" HeaderText="施工层段顶深" 
                    SortExpression="SGJDDS1" FooterText="需要补录，来自施工总结" />
                <asp:BoundField DataField="SGJDDS2" HeaderText="施工层段底深" 
                    SortExpression="SGJDDS2" FooterText="需要补录，来自施工总结" />
                <asp:BoundField DataField="CWSYHD" HeaderText="措施层位砂岩厚度" 
                    SortExpression="CWSYHD" FooterText="需要补录，来自施工总结射开厚度" />
                <asp:BoundField DataField="CWYXHD" HeaderText="措施层位有效厚度" 
                    SortExpression="CWYXHD" FooterText="需要补录，来自施工总结有效厚度" />
                <asp:BoundField DataField="JSL" HeaderText="加砂量" SortExpression="JSL" 
                    FooterText="压裂过程中参数,需要补录，来自施工总结" />
                <asp:BoundField DataField="PLYL" HeaderText="破裂压力" SortExpression="PLYL" 
                    FooterText="压裂过程中参数,需要补录，来自施工总结" />
                <asp:BoundField DataField="BZ" HeaderText="备注" SortExpression="BZ" />
            </Columns>
            <PagerSettings FirstPageImageUrl="~/Images/First.gif" 
                LastPageImageUrl="~/Images/Last.gif" 
                NextPageImageUrl="~/Images/Next.gif" 
                PreviousPageImageUrl="~/Images/Previous.gif" />
            <PagerStyle HorizontalAlign="Center" />
            <SelectedRowStyle BackColor="#669999" />
        </asp:GridView>
    <strong>
        <asp:Button ID="ExportData" runat="server" onclick="ExportData_Click" 
            Text="导出到电子表格" />
        </strong>
    <asp:Panel ID="Panel1" runat="server">
        <asp:Label ID="Label4" runat="server" Text="井号"></asp:Label>
        <asp:TextBox ID="txtJH" runat="server" Width="100px" ReadOnly="True"></asp:TextBox>
        <asp:Label ID="Label5" runat="server" Text="上报日期"></asp:Label>
        <asp:TextBox ID="txtSBRQ" runat="server" Width="100px" ReadOnly="True"></asp:TextBox>
        <asp:Label ID="Label6" runat="server" Text="开工日期"></asp:Label>
        <asp:TextBox ID="txtKGRQ" runat="server" Width="100px"></asp:TextBox>
        <asp:Label ID="Label7" runat="server" Text="完工日期"></asp:Label>
        <asp:TextBox ID="txtWGRQ" runat="server" Width="100px"></asp:TextBox>
        <br />
        <asp:Label ID="Label8" runat="server" Text="措施名称"></asp:Label>
        <asp:TextBox ID="txtCSMC" runat="server"></asp:TextBox>
        <asp:Label ID="Label9" runat="server" Text="施工方式"></asp:Label>
        <asp:TextBox ID="txtSGFS" runat="server"></asp:TextBox>
        <asp:Label ID="Label10" runat="server" Text="措施层段"></asp:Label>
        <asp:TextBox ID="txtCSCD" runat="server"></asp:TextBox>
        <br />
        <asp:Label ID="Label11" runat="server" Text="施工层段顶深"></asp:Label>
        <asp:TextBox ID="txtSGJDDS1" runat="server" ReadOnly="True"></asp:TextBox>
        <asp:Label ID="Label12" runat="server" Text="施工层段底深"></asp:Label>
        <asp:TextBox ID="txtSGJDDS2" runat="server"></asp:TextBox>
        <br />
        <asp:Label ID="Label13" runat="server" Text="措施层位砂岩厚度"></asp:Label>
        <asp:TextBox ID="txtCWSYHD" runat="server"></asp:TextBox>
        <asp:Label ID="Label14" runat="server" Text="措施层位有效 厚度"></asp:Label>
        <asp:TextBox ID="txtCWYXHD" runat="server"></asp:TextBox>
        <br />
        <asp:Label ID="Label15" runat="server" Text="加砂量"></asp:Label>
        <asp:TextBox ID="txtJSL" runat="server"></asp:TextBox>
        <asp:Label ID="Label16" runat="server" Text="破裂压力"></asp:Label>
        <asp:TextBox ID="txtPLYL" runat="server" ReadOnly="True"></asp:TextBox>
        <br />
        <asp:Label ID="Label17" runat="server" Text="备注"></asp:Label>
        <asp:TextBox ID="txtBZ" runat="server" Height="50px" TextMode="MultiLine" 
            Width="250px"></asp:TextBox>
        <br />
        <asp:Button ID="Button1" runat="server" onclick="Button1_Click" Text="提交" 
            onclientclick="return confirm('提交后不可更改，请仔细审核数据')" />
        <asp:Button ID="Button2" runat="server" onclick="Button2_Click" Text="取消" />
    </asp:Panel>
    <p>
        <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
            ConnectionString="<%$ ConnectionStrings:ConnectionStringForOracle %>" 
            ProviderName="<%$ ConnectionStrings:ConnectionStringForOracle.ProviderName %>" 
            SelectCommand="SELECT JH,SBRQ,KGRQ,WGRQ,CSMC,SGFS,CSCD,SGCW,SGJDDS1,SGJDDS2,CWSYHD,CWYXHD,JSL,PLYL,BZ,YLRQ,YLCS,CH FROM BC_YALIE WHERE (CSCD IS NULL) OR (INSTR(CSCD, '_') = 0) ORDER BY SBRQ DESC" 
            UpdateCommand="UPDATE BC_YALIE SET SBRQ = :SBRQ,WGRQ = :WGRQ,CSMC = :CSMC,SGFS = :SGFS,CSCD = :CSCD,SGJDDS2 = :SGJDDS2 ,CWSYHD = :CWSYHD,CWYXHD = :CWYXHD,JSL = :JSL,BZ = :BZ WHERE JH = :JH AND KGRQ = :KGRQ AND YLRQ = :YLRQ  AND YLCS = :YLCS AND CH =:CH AND SGCW = :SGCW AND SGJDDS1 =:SGJDDS1 AND PLYL =:PLYL">
            <UpdateParameters>
                <asp:Parameter Name="SBRQ" />
                <asp:Parameter Name="WGRQ" />
                <asp:Parameter Name="CSMC" />
                <asp:Parameter Name="SGFS" />
                <asp:Parameter Name="CSCD" />
                <asp:Parameter Name="SGJDDS2" />
                <asp:Parameter Name="CWSYHD" />
                <asp:Parameter Name="CWYXHD" />
                <asp:Parameter Name="JSL" />
                <asp:Parameter Name="BZ" />
                <asp:Parameter Name="JH" />
                <asp:Parameter Name="KGRQ" />
                <asp:Parameter Name="YLRQ" />
                <asp:Parameter Name="YLCS" />
                <asp:Parameter Name="CH" />
                <asp:Parameter Name="SGCW" />
                <asp:Parameter Name="SGJDDS1" />
                <asp:Parameter Name="PLYL" />
            </UpdateParameters>
        </asp:SqlDataSource>
    </p>
</asp:Content>

